<template>
  <div class="info-card">
    <el-card class="box-card">
      <div class="card-text" v-html="content">

      </div>

    </el-card>
  </div>
</template>

<script>

export default {
  props: {
    json_path: {type:String,default:""},
  },
  data() {
    return {
      content: "",
    };
  },
  watch: {
    json_path :{ 
      immediate: true,
      handler() {
        this.init()
      }
    }
  },
  methods: {
    init() {
      this.$http.get(this.json_path).then((response) => {
        this.content = response.data.content;
      });
    },
  },
  created() {
    this.init()
  }

 };
</script>

<style lang="less" scoped>
@import "../typora_like.less";
.info-card{width: 100%; }
</style>
